How do i resolve method Overlapping in java/Processing [duplicate]

Posted by user3718913 on Stack Overflow See other posts from Stack Overflow or by user3718913
Published on 2014-06-09T03:11:51Z Indexed on 2014/06/09 3:25 UTC
Read the original article Hit count: 124

Filed under:
|
|

This question already has an answer here:

I have two methods/function in a class, called, Qestion1 and Question2, i want it in such a way that after the user has answered Question one correctly, the Question 2 method is called. Whenever i call the method 2, it displays both of them together instead exiting the first method first. Here's a dummy code to illustrate what i'm saying:

void Question1()  {
 String question="What is the capital of England?";
 String Answer="London";

if(Answer=='London')
 {
Question2();
 }
 }


 void Question2()  {
 String question="What is the capital of California?";
 String Answer="Sacramento";

  if(Answer=='Sacramento')
     {
 Question3();
  }
   }

Pls, this question is in no way related to that other question. Pls peruse the thread again.

© Stack Overflow or respective owner

Related posts about java

Related posts about methods